/*
 * Relation.h
 *
 *  Created on: May 26, 2012
 *      Author: Romeo
 */

#ifndef RELATION_H_
#define RELATION_H_

#include <vector>
#include <string>
#include<iostream>
#include "common.h"
#include "XMLFormatter.h"
#include "maxent.h"
#include <fstream>
#include "pugixml.hpp"
#include <stdlib.h>
#include <sstream>
#include "pugixml.hpp"
#include <list>
namespace std {

class Relation {
public:
	Relation();
	vector<Relation> readFromXML(string path);
	void write_to_XML(string Path);
	void  write_to_XML(string path,vector<Relation> realtions);
	void get_XML(pugi::xml_node*);
	ME_Sample FeatureExtractor(string label);
	void TrainRelations(string,vector<Relation>,const vector<ME_Model> & vme, const vector<ME_Model> & chunking_vme,const ME_Model & NE);
	void Evaluate(vector<Relation>,vector<ME_Model>,vector<ME_Model> ,ME_Model);
	void classifier(ME_Model,ME_Sample);
	void writetoHTML(vector<Relation>,string filename);
	vector<Relation> FindRelations(Sentence s,ME_Model CheckRelation,ME_Model Found_or_NOT);
	void EvaluateSystem(vector<ME_Model>,vector<ME_Model>,ME_Model,vector<Relation>);
	void NLPProcessing(const vector<ME_Model> & vme, const vector<ME_Model> & chunking_vme,const ME_Model & me);
	virtual ~Relation();
	Sentence *my_sentences;
	string clue;
	string name_entity_type_1;
	string name_entity_type_2;
	string relation_type;
	int begin_entity1;
	int end_entity1;
	int begin_entity2;
	int end_entity2;
	//long Num;
};

} /* namespace std */
//#endif /* RELATION_H_ */
#endif
